class Animal {
  // public 访问权限修饰符，默认public所有地方均可访问
  public move() {
    console.log('Animal move')
  }
  // protected 访问权限修饰符，子类和本类可访问,实例对象不可访问
  protected run() {
    console.log('Animal run')
  }
  // private 访问权限修饰符，本类可访问，实例对象不可访问
  private __eat__() {
    console.log('Animal eat')
  }
}

class Dog extends Animal {
  bark() {
    console.log('Dog bark')
  }
}

const dog = new Dog()
dog.move()
dog.bark()